package cn.zsb.PolymorphicDemo;

public class Test {
    public static void main(String[] args) {
        /*Person p1 = new Person("老王", 51);
        Dog d = new Dog(2, "黑");
        p1.keepPet(d, "骨头");

        Person p2 = new Person("牢李", 23);
        Cat c = new Cat(3,"白");
        p2.keepPet(c,"🐟");
        */
        Person p = new Person("蔡徐坤", 29);
        Dog d = new Dog(2,"黑");
        Cat c = new Cat(3,"白");
        p.keepPet(d,"史");
        p.keepPet(c,"猫粮");

    }
}
